#ifndef DISKCHART_H
#define DISKCHART_H

#include <QMainWindow>
#include <QThread>
#include <QTimer>

#include <QString>
#include <QJsonObject>
#include <QJsonArray>

namespace Ui {
	class MainWindow;
}

class CDirInfo;

class CDiskChart:public QMainWindow
{
	Q_OBJECT
	QThread workerThread;
public:
	CDiskChart(QWidget* parent = Q_NULLPTR, Qt::WindowFlags f = Qt::WindowFlags());
	~CDiskChart();

protected:
	void start(QString path);

protected Q_SLOTS:

	protected Q_SLOTS:
	void on_pbAlert_clicked();
    void on_pbDir_clicked();
    void onDirIndexChange(int);
    void onProgress(float);
    void onFinished();

Q_SIGNALS:
	void operate(const QString &);
	void sendstring2js(QString);
	void sendjsonarray2js(QJsonArray);
	void sendjsonobj2js(QJsonObject);
private:
    void paint();
    void createTable();
private:
	Ui::MainWindow *ui;
	QTimer _timer;
	CDirInfo *dir;
};



#endif
